/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package intelligenttm.SourceFile;

import java.util.List;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import me.aviator.entity.Ribbon;
import me.aviator.entity.myColor;

/**
 *
 * @author 望舒凌霄
 */
public class RibbonShow {
    private HBox CHB=new HBox();

    public RibbonShow( Ribbon RC) {
        CHB.getChildren().clear();
        CHB.prefHeight(25);
        CHB.prefWidth(25);
        int Num=RC.getNum();
        List<myColor> myCL=RC.getColorlist();
        Color C=null;
        for (int i=0;i<Num;i++){
            Rectangle Rect=new Rectangle();
            myColor MC=myCL.get(i);
            C=Color.rgb(MC.getRed(), MC.getGreen(), MC.getBlue());
            Rect.setFill(C);
            Rect.setHeight(25);
            Rect.setWidth(25);
            CHB.getChildren().add(Rect);
        }
    }

    public HBox getCHB() {
        return CHB;
    }

    public void setCHB(HBox CHB) {
        this.CHB = CHB;
    }
    
}
